package app;

import java.io.File;

import wsi.script.AppConfig;
import wsi.script.AppScriptInitializer;

public class scriptInit extends App {

	public static void main(String... args) {
		init();

		String path = "/home/nanmus/Experiments/app/";
		assert path != null;

		save(path + "config_gui.xml", true);
		save(path + "config_l.xml", true);
		save(path + "config_s.xml", false);

		bye();
	}

	static void save(String file, boolean local) {
		new File(file).delete();

		AppConfig.reset();
		AppConfig.init(file);
		AppConfig as = AppConfig.shared();
		assert as != null;

		as.setTree(AppScriptInitializer.initTree(local));
		as.save();

		// as.check(true);
	}

}
